Skip to main content

ValueAnimator

declare class ValueAnimator extends Animator {}

ValueAnimator

Instance Method

constructor

declare class ValueAnimator {
constructor(context: Context)
}
  • Description

    Create a new ValueAnimator

isRunning

declare class ValueAnimator {
isRunning(): boolean
}
  • Description

    Returns whether this Animator is currently running (having been started and gone past any initial startDelay period and not yet ended).

start

declare class ValueAnimator {
start(): void
}
  • Description

    Starts this animation.

cancel

declare class ValueAnimator {
cancel(): void
}
  • Description

    Cancels the animation.

end

declare class ValueAnimator {
end(): void
}
  • Description

    Ends the animation.

reverse

declare class ValueAnimator {
reverse(): void
}
  • Description

    Plays the ValueAnimator in reverse.

addUpdateListener

declare class ValueAnimator {
addUpdateListener(listener: ValueAnimator.AnimatorUpdateListener): void
}
  • Description

    Adds a listener to the set of listeners that are sent update events through the life of an animation.

removeAllUpdateListeners

declare class ValueAnimator {
removeAllUpdateListeners(): void
}
  • Description

    Removes all listeners from the set listening to frame updates for this animation.

removeUpdateListener

declare class ValueAnimator {
removeUpdateListener(listener: ValueAnimator.AnimatorUpdateListener): void
}
  • Description

    Removes a listener from the set listening to frame updates for this animation.

getRepeatMode

declare class ValueAnimator {
getRepeatMode(): number
}
  • Description

    Defines what this animation should do when it reaches the end.

getValues

declare class ValueAnimator {
getValues(): PropertyValuesHolder[]
}
  • Description

    Returns the values that this ValueAnimator animates between.

getInterpolator

declare class ValueAnimator {
getInterpolator(): TimeInterpolator
}
  • Description

    Returns the timing interpolator that this ValueAnimator uses.

getAnimatedValue

declare class ValueAnimator {
getAnimatedValue(): Object
}
  • Description

    The most recent value calculated by this ValueAnimator when there is just one property being animated.

getAnimatedValue

declare class ValueAnimator {
getAnimatedValue(propertyName: string): Object
}
  • Description

    The most recent value calculated by this ValueAnimator for propertyName.

getRepeatCount

declare class ValueAnimator {
getRepeatCount(): number
}
  • Description

    Defines how many times the animation should repeat.

getDuration

declare class ValueAnimator {
getDuration(): number
}
  • Description

    Gets the length of the animation.

getCurrentPlayTime

declare class ValueAnimator {
getCurrentPlayTime(): number
}
  • Description

    Gets the current position of the animation in time, which is equal to the current time minus the time that the animation started.

getStartDelay

declare class ValueAnimator {
getStartDelay(): number
}
  • Description

    The amount of time, in milliseconds, to delay starting the animation after start() is called.

getContext

declare class ValueAnimator {
getContext(): Context
}
  • Description

    Gets Context

setIntValues

declare class ValueAnimator {
setIntValues(...values: number[]): void
}
  • Description

    Sets int values that will be animated between.

setFloatValues

declare class ValueAnimator {
setFloatValues(...values: number[]) : void
}
  • Description

    Sets float values that will be animated between.

setObjectValues

declare class ValueAnimator {
setObjectValues(...values: Object[]): void
}
  • Description

    Sets the values to animate between for this animation.

setValues

declare class ValueAnimator {
setValues(...values: PropertyValuesHolder[]): void
}
  • Description

    Sets the values, per property, being animated between.

setStartDelay

declare class ValueAnimator {
setStartDelay(startDelay: number): void
}
  • Description

    The amount of time, in milliseconds, to delay starting the animation after start() is called.

setRepeatMode

declare class ValueAnimator {
setRepeatMode(value: number): void
}
  • Description

    Defines what this animation should do when it reaches the end.

setRepeatCount

declare class ValueAnimator {
setRepeatCount(value: number) :void
}
  • Description

    Sets how many times the animation should be repeated.

setEvaluator

declare class ValueAnimator {
setEvaluator(value: TypeEvaluator) : void
}
  • Description

    The type evaluator to be used when calculating the animated values of this animation.

setDuration

declare class ValueAnimator {
setDuration(duration: number): Animator
}
  • Description

    Sets the length of the animation.

setInterpolator

declare class ValueAnimator {
setInterpolator(value: TimeInterpolator): void
}
  • Description

    The time interpolator used in calculating the elapsed fraction of this animation.

setCurrentPlayTime

declare class ValueAnimator {
setCurrentPlayTime(playTime: number): void
}
  • Description

    Sets the position of the animation to the specified point in time.

addListener

declare class ValueAnimator {
addListener(listener: Animator.AnimatorListener): void
}
  • Description

    Adds a listener to the set of listeners that are sent events through the life of an animation, such as start, repeat, and end.

removeListener

declare class ValueAnimator {
removeListener(listener: Animator.AnimatorListener): void
}
  • Description

    Removes a listener from the set listening to this animation.

removeAllListeners

declare class ValueAnimator {
removeAllListeners(): void
}
  • Description

    Removes all listeners and pauseListeners from this object.

getListeners

declare class ValueAnimator {
getListeners(): ArrayList<Animator.AnimatorListener>
}
  • Description

    Gets the set of Animator.AnimatorListener objects that are currently listening for events on this Animator object.

clone

declare class ValueAnimator {
clone(): ValueAnimator
}
  • Description

    Creates and returns a copy of this object.

setTarget

declare class ValueAnimator {
setTarget(target: Object): void
}
  • Description

    Sets the target object whose property will be animated by this animation.

setupEndValues

declare class ValueAnimator {
setupEndValues(): void
}
  • Description

    This method tells the object to use appropriate information to extract ending values for the animation.

setupStartValues

declare class ValueAnimator {
setupStartValues(): void
}
  • Description

    This method tells the object to use appropriate information to extract starting values for the animation.

ValueAnimator.AnimatorUpdateListener

AnimatorUpdateListener

interface AnimatorUpdateListener {
onAnimationUpdate(animation: ValueAnimator): void;
}

Instance Method

onAnimationUpdate

declare class AnimatorUpdateListener {
onAnimationUpdate(animation: ValueAnimator): void
}
  • Description

    Notifies the occurrence of another frame of the animation.